<template>
	<view>
		<top-tabs @ontabtap="ontabtap" :currentIdx="currentIdx"></top-tabs>
		<swiper @change="handleSwiper" :current="currentIdx" >	
			<swiper-item v-for="(item,index) in items" :key="index">
				<work-order-card></work-order-card>
			</swiper-item>
			
		</swiper>
	</view>
</template>

<script>
	import TopTabs from "../../components/work-order/top-tabs.vue"
	import workOrderCard from "../../components/work-order/work-order-card.vue"
	export default {
		data() {
			return {
				currentIdx:0,
				items:['1','2','3']
			}
		},
		methods: {
			ontabtap(index) {
				this.currentIdx = index;
			},
			handleSwiper(event) {
				this.currentIdx = event.target.current;
			},
		},
		components:{TopTabs, workOrderCard}
	}
</script>

<style>

</style>
